CRPEJob::SetNthGroupSortField

Use CRPEJob::SetNthGroupSortField to set the name of the group sort field and the sort direction (ascending or descending). This method is typically used as one of a series of calls (CRPEJob::GetNGroupSortFields, called once; CRPEJob::GetNthGroupSortField, called as many times as needed to identify the correct group sort field; and CRPEJob::SetNthGroupSortField called once when the correct group sort field is identified). This series of methods can be used to identify and then change an existing group sort field and/or sort order in response to a user selection at print time. This method does not create a new group, but will sort an existing group summary field.

Syntax
BOOL SetNthGroupSortField (
        short sortFieldN,
        const _TCHAR *field,
        short direction );
Parameters

sortFieldN

Specifies the number of the group sort field that you want to set. The first group sort field added to the report is field 0, the second is 1, etc. If the report has N group sort fields, the function can be called with this parameter between 0 and N-1 to replace an existing group sort field. Call the function with this parameter equal to N to add a new group sort field.

field

Specifies a pointer to the name of the group field to be sorted.

direction

Specifies the sort direction. Uses one of the PEP_SF_XXX Sort Order Constants.

Returns


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com